/*
 * @Author: g05047
 * @Date: 2023-08-08 15:54:00
 * @LastEditors: g05047
 * @LastEditTime: 2023-08-14 17:34:01
 * @Description: file content
 */
import request from '@/utils/request.js';
import request_ssa from '@/utils/request_ssa'//ssa单独的request

let VUE_APP_BASE_API = 'dailySupervision-api';
let SSA_BASE = '/ssa-pc-api-suzhou'//本地
// let SSA_BASE = 'https://spaq.suzhou.gov.cn'//打包，企业档案用spaq.suzhou


//上传图片
export const uploadAPI = VUE_APP_BASE_API + '/rcjd-api/upload/pic'

/**企业基础信息 */
export function getBodyIndustry() {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/sysDict/list/bodyIndustry",
    method: "get",
  });
}
//查询主体业态备注字典
// export function getBodyIndustryRemark(parentId) {
//   return request({
//     url: "/rcjd-api/sysDict/list/bodyIndustryRemark?parentId=" + parentId,
//     method: "get",
//   });
// }
//企业信用档案列表
export function getCreditFile(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/superviseunitbase/list/creditFile",
    method: "post",
    data
  });
}

//查询经营项目
export function getBusiness(bodyIndustry) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/sysDict/list/business?bodyIndustry=" + bodyIndustry,
    method: "get",
  });
}

//修改单位企业状态
export function updateUnitStatus(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/superviseunitbase/update/unitStatus",
    method: "post",
    data
  });
}

//获取企业档案信息详情
export function getUnitDetail(id) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/superviseunitbase/detail?id=" + id,
    method: "get",
  });
}

//社会信用档案导出
export function exportUnitList(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/download/exports/list/creditFile",
    method: "get",
    params: data,
    loading: true
  });
}


//根据许可号换id
export function licenseAcquisitionId(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/data/synchronization/licenseAcquisitionId",
    method: "get",
    params: data
  });
}

//根据单位id获取食安指数详情
export function findByFSuperviseunitId(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/unit/food/safety/update/findByFSuperviseunitId",
    method: "get",
    params: data
  });
}
//根据单位id获取食安指数详情
export function findListByConditionSafety(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/unit/food/safety/update/findListByCondition",
    method: "post",
    data
  });
}

//主体责任落实情况
export function findTask(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/ssa/supervise/unit/findTask",
    method: "post",
    data
  });
}

//findByBodyIndustry
export function findByBodyIndustry(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/unit/body/industry/findUnitBodyIndustryList",
    method: "post",
    data
  });
}

//获取主体业态
export function CompanyMainPageInfo(id) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/ssa/supervise/unit/findSuperviseunitHeadList?id=" + id,
    method: "get",
  });
}

//获取培训登记
export function QueryUnitTraningRecordList(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/unit/training/record/QueryUnitTraningRecordList",
    method: "post",
    data
  });
}

//安全承诺书
export function QueryEtterCommitmentList(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/etter/commitment/QueryEtterCommitmentList",
    method: "post",
    data
  });
}

//自查
export function findUnitCheckResultListNew(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/unit/check/result/findUnitCheckResultListNew",
    method: "post",
    data
  });
}

// 针对性自查
export function findPertinenceInspectList(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/pertinence/inspect/findPertinenceInspectList",
    method: "post",
    data
  });
}

//查看自查详情
export function findUnitCheckResultInfoById(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/unit/check/result/findUnitCheckResultInfoById",
    method: "post",
    data
  });
}

//自查报告
export function QueryselfExaminationReportList(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/self/examination/report/QueryselfExaminationReportList",
    method: "post",
    data
  });
}

// 日历
export function findState(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/ssa/supervise/unit/findState",
    method: "post",
    data
  });
}

// 食安制度
export function QueryfoodSafetySystemList(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/food/safety/system/QueryfoodSafetySystemList",
    method: "post",
    data
  });
}

// 菜谱类型
export function QueryUnitRecipeList(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/unit/recipe/QueryUnitRecipeList",
    method: "post",
    data
  });
}

// 陪餐
export function QueryUnitAccoumpanyToEatList(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/unit/accompany/to/eat/QueryUnitAccoumpanyToEatList",
    method: "post",
    data
  });
}

// 人员列表
export function findCompanyPersonnelInfolist(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/login/unit/findCompanyPersonnelInfolist",
    method: "post",
    data
  });
}

// 人员列表详情
export function queryPeopleInfo(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/login/unit/queryPeopleInfo",
    method: "post",
    data
  });
}

// 废弃物处理
export function QueryunitWasteHandleList(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/unit/waste/handle/QueryunitWasteHandleList",
    method: "post",
    data
  });
}

//餐具消毒
export function QueryunitTablewareDisinList(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/unit/tableware/disin/QueryunitTablewareDisinList",
    method: "post",
    data
  });
}

// 晨检
export function queryUnitMorningCheck(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/unit/morning/check/queryUnitMorningCheck",
    method: "post",
    data
  });
}

//食谱
export function QueryUnitSampleList(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/unit/sample/QueryUnitSampleList",
    method: "post",
    data
  });
}

//获取索证索票检测报告详情
export function findTestReportAndPurchasingDocuments(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/ssa/quick/check/item/jc/findTestReportAndPurchasingDocuments",
    method: "post",
    data
  });
}


//获取索证索票快检详情
export function jcFindListByCondition(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/ssa/quick/check/item/jc/findListByCondition",
    method: "post",
    data
  });
}


// 索证索票
export function findCertificateAndTicketList(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/purchase/bill/findCertificateAndTicketList",
    method: "post",
    data
  });
}

//获取索证索票详情
export function findCertificateAndTicketById(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/purchase/bill/findCertificateAndTicketById",
    method: "post",
    data
  });
}

//快检管理
export function SsaQuickCheck(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/ssa/quick/check/item/jc/quickUnitList",
    method: "post",
    data
  });
}

//责任任命
export function findPeopleType(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/ssa/responsibility/findPeopleType",
    method: "post",
    data
  });
}
export function getPdfResponsibilityRecord(id) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/ssa/responsibility/getPdfResponsibilityRecord?id=" + id,
    method: "get",
  });
}


//日常监督
export function dailyCheckResultList(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/superviseunitbase/detail/dailyCheckResult",
    method: "get",
    params: data
  });
}

//复查整改详情（日常监督）
export function dailyCheckResultDetail(id) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/superviseunitbase/detail/dailyCheckResultDetail?id=" + id,
    method: "get",
  });
}

//获取企业档案中举报记录
export function complaintsReport(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/superviseunitbase/detail/getReport",
    method: "get",
    params: data
  });
}


//获取企业档案中稽查执法记录
export function inspectExecuteList(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/superviseunitbase/detail/caseCheck",
    method: "get",
    params: data
  });
}

//获取企业档案中抽检记录
export function foodSpotCheck(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/superviseunitbase/detail/spotCheck",
    method: "get",
    params: data
  });
}

//获取企业档案信息详情
export function unitDetail(id) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/superviseunitbase/detail?id=" + id,
    method: "get",
  });
}

//三件事
export function findDailyControl(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/daily/control/result/findDailyControl",
    method: "post",
    data
  });
}
export function findByIdDailyControl(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/daily/control/result/findByIdDailyControl",
    method: "post",
    data
  });
}
export function findControlRectification(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/daily/control/result/findControlRectification",
    method: "post",
    data
  });
}
export function findWeeklyScreeningResult(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/daily/control/result/findWeeklyScreeningResult",
    method: "post",
    data
  });
}
export function findMonthlyScreeningResult(data) {
  return request_ssa({
    url: SSA_BASE + "/ssa-pc-api/daily/control/result/findMonthlyScreeningResult",
    method: "post",
    data
  });
}
/** */


/**监管单位设置 */
//所属主体列表
export function getSuperviseUnitBaseList(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/superviseunitbase/list",
    method: "post",
    data
  });
}

//修改主体所属监督机构
export function updateSuperviseUnitBase(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/superviseunitbase/update/batch/unitId",
    method: "post",
    data
  });
}
/** */


/**营业执照异常单位 */
//社会信用代码状态异常列表
export function getIdentifyStateList(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/superviseunitbase/list/identify/state",
    method: "post",
    data
  });
}
/** */


/**单位认领管理 */

/** */


/**单位异常列表 */
//查询单位异常列表
export function getUnitAbnormalList(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/superviseState/list",
    method: "post",
    data
  });
}
//查询单位异常列表详情
export function getUnitAbnormalDetail(id) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/superviseState/detail?id=" + id,
    method: "get",
  });
}
//审核单位异常信息
export function updateUnitAbnormal(data) {
  return request({
    url: VUE_APP_BASE_API + "/rcjd-api/superviseState/updateCheckStatus",
    method: "post",
    data
  });
}
/** */































































